Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add string rule to the core rules #133

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ashleyhood
Copy link

This rule allows for any value that returns true from is_string($value).

@@ -4,7 +4,7 @@

use Rakit\Validation\Rule;

class Alpha extends Rule
class String extends Rule

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In PHP, case is often not important, so "String" cannot be used for the class name. It would be possible to write "StringRule", but this is not customary inside the library. I suggest renaming the class to "Text" and renaming the rule to "text". Maybe something doesn't sound right, I used a translator.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Chamber6821.

That will teach me for doing too many things at once, late at night 😛

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants